namespace ExcelTemplateEngine.OpenXML
{
    /// <summary>
    /// 样式表接口
    /// </summary>
    public interface IStylesheet
    {
        /// <summary>
        /// 添加单元格格式
        /// </summary>
        /// <param name="cellFormat">单元格格式</param>
        /// <returns>格式索引</returns>
        uint AddCellFormat(ICellFormat cellFormat);
        
        /// <summary>
        /// 获取单元格格式
        /// </summary>
        /// <param name="index">格式索引</param>
        /// <returns>单元格格式</returns>
        ICellFormat GetCellFormat(uint index);
        
        /// <summary>
        /// 添加字体
        /// </summary>
        /// <param name="font">字体</param>
        /// <returns>字体索引</returns>
        uint AddFont(IFont font);
        
        /// <summary>
        /// 获取字体
        /// </summary>
        /// <param name="index">字体索引</param>
        /// <returns>字体</returns>
        IFont GetFont(uint index);
        
        /// <summary>
        /// 添加填充
        /// </summary>
        /// <param name="fill">填充</param>
        /// <returns>填充索引</returns>
        uint AddFill(IFill fill);
        
        /// <summary>
        /// 获取填充
        /// </summary>
        /// <param name="index">填充索引</param>
        /// <returns>填充</returns>
        IFill GetFill(uint index);
        
        /// <summary>
        /// 添加边框
        /// </summary>
        /// <param name="border">边框</param>
        /// <returns>边框索引</returns>
        uint AddBorder(IBorder border);
        
        /// <summary>
        /// 获取边框
        /// </summary>
        /// <param name="index">边框索引</param>
        /// <returns>边框</returns>
        IBorder GetBorder(uint index);
    }
    
    /// <summary>
    /// 单元格格式接口
    /// </summary>
    public interface ICellFormat
    {
        uint FontId { get; set; }
        uint FillId { get; set; }
        uint BorderId { get; set; }
        string NumberFormat { get; set; }
    }
    
    /// <summary>
    /// 字体接口
    /// </summary>
    public interface IFont
    {
        string Name { get; set; }
        double Size { get; set; }
        bool Bold { get; set; }
        bool Italic { get; set; }
        string Color { get; set; }
    }
    
    /// <summary>
    /// 填充接口
    /// </summary>
    public interface IFill
    {
        string BackgroundColor { get; set; }
        string ForegroundColor { get; set; }
        string Pattern { get; set; }
    }
    
    /// <summary>
    /// 边框接口
    /// </summary>
    public interface IBorder
    {
        string Left { get; set; }
        string Right { get; set; }
        string Top { get; set; }
        string Bottom { get; set; }
    }
}